﻿using BCCommon;
using BCCommon.FMISEnums;
using BCCommon.OAEnums;
using BCCommon.SCMEnums;
using BCDto.MySql.Admin;
using BCDto.OA.TeamWorks.TaskRecord;
using BCDto.OA.TeamWorks.TaskRecordCount;
using BCDto.OA.TeamWorks.TaskRejectRecord;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.OA.TeamWorks.FMISTaskRecordService
{
    /// <summary>
    /// 财务系统任务记录
    /// </summary>
    public interface IFMISTaskRecordService
    {
        /// <summary>
        /// 获取每日的任务数量
        /// </summary>
        /// <param name="executerAdminId">任务执行人Id</param>
        /// <returns></returns>
        FMISTaskRecordCountDto TodayRecordCount(long? executerAdminId);
        /// <summary>
        /// 获取财务系统任务记录信息
        /// </summary>
        /// <param name="executerAdminId">任务执行人Id</param>
        /// <param name="date">日期</param>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">结束日期</param>
        /// <param name="handleStatus">处理方式</param>
        /// <param name="taskType">任务类型</param>
        /// <param name="isException">是否异常</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="taskExecuterFullName">制单人</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <param name="companyId">公司Id</param>
        /// <param name="saleContractNo">销售合同编号</param>
        /// <param name="purchaseContractNo">采购合同编号</param>
        /// <param name="buyerName">购买方</param>
        /// <param name="vehicleBrandName">品牌</param>
        /// <returns></returns>
        PageableList<FMISTaskRecordDto> Query(long? executerAdminId, DateTime? date, DateTime? startDate, DateTime? endDate, OATaskHandleStatus? handleStatus, FMISTaskType? taskType, bool? isException,
            string sortName, bool? ascending, string taskExecuterFullName, int pageIndex, int pageSize, int? companyId,
            string saleContractNo, string purchaseContractNo, string vehicleBrandName, string buyerName);
        /// <summary>
        /// 获取驳回记录
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="workflowActivityInstanceId">工作流活动实例Id</param>
        /// <returns></returns>
        IEnumerable<TaskRejectRecordDto> RejectRecords(AdminDto adminDto, long workflowActivityInstanceId);

        /// <summary>
        /// 下发通用付款任务
        /// </summary>
        /// <param name="workflowActivityInstanceId">工作流活动实例Id</param>
        /// <returns></returns>
        FMISTaskRecordDto CreatePaymentTask(long workflowActivityInstanceId);

        /// <summary>
        /// 下发通用收款任务
        /// </summary>
        /// <param name="workflowActivityInstanceId">工作流活动实例Id</param>
        /// <returns></returns>
        FMISTaskRecordDto CreateReceiptTask(long workflowActivityInstanceId);

        /// <summary>
        /// 下发通用入账任务
        /// </summary>
        /// <param name="workflowActivityInstanceId">工作流活动实例Id</param>
        /// <returns></returns>
        FMISTaskRecordDto CreateAccountTask(long workflowActivityInstanceId);

        /// <summary>
        /// 处理异常信息
        /// </summary>
        /// <param name="workflowActivityInstanceId"></param>
        /// <param name="handledRemark">处理备注</param>
        /// <returns></returns>
        IEnumerable<FMISTaskRecordDto> HandledException(long workflowActivityInstanceId, string handledRemark);

    }
}
